package com.qumitech.visualnovel.datasource.console;

import com.qumitech.visualnovel.controller.vo.retain.RetainConfigVO;
import com.qumitech.visualnovel.model.dao.console.AccountDailyActive;
import com.qumitech.visualnovel.pubdef.dto.retain.RetainConfigDTO;
import com.qumitech.visualnovel.pubdef.dto.retain.RetainMessageDTO;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface RetainConfigMapper {
    List<RetainConfigVO> listRetainConfig(@Param(value = "name") String name,
                                          @Param(value = "grouping") String grouping,
                                          @Param(value = "status") Integer status,
                                          @Param(value = "createTime") String createTime,
                                          @Param(value = "orderBy") String orderBy,
                                          @Param(value = "orderType") String orderType,
                                          @Param(value = "offset") int offset,
                                          @Param(value = "limit") int limit);

    int countRetainConfig(@Param(value = "name") String name,
                          @Param(value = "grouping") String grouping,
                          @Param(value = "status") Integer status,
                          @Param(value = "createTime") String createTime);

    int createRetainConfig(RetainConfigDTO retainConfigDTO);

    int updateRetainConfig(RetainConfigDTO retainConfigDTO);

    int deleteRetainConfig(Integer id);

    int modifyRetainConfigStatus(RetainConfigDTO retainConfigDTO);

    List<HashMap<String, Object>> listRetainGroupings();

    List<HashMap<String, Object>> listRetainMessages(@Param(value = "type") Integer type,
                                                     @Param(value = "title") String title,
                                                     @Param(value = "content") String content,
                                                     @Param(value = "orderBy") String orderBy,
                                                     @Param(value = "orderType") String orderType,
                                                     @Param(value = "offset") int offset,
                                                     @Param(value = "limit") int limit);

    int countRetainMessages(@Param(value = "type") Integer type,
                            @Param(value = "title") String title,
                            @Param(value = "content") String content);

    int createRetainMessage(RetainMessageDTO retainMessageDTO);

    int updateRetainMessage(RetainMessageDTO retainMessageDTO);

    int deleteRetainMessage(Integer id);

}